﻿using System;

namespace ApiScanner.Core
{
    public sealed class StoreEventBinding : EventBinding
    {
        public string MatchScope { get; private set; }
        public Uri Url { get; private set; }
        public MdbType MdbType { get; private set; }
        public string SerialNumberString { get; set; }
        public string Criteria { get; private set; }
        public Uri ScriptUrl { get; private set; }
        public string SinkClass { get; private set; }
        public string ComClassInfo { get; private set; }

        internal StoreEventBinding(StoreEvent storeEvent, MdbType type, string serialNumberString): base(storeEvent.Name, Certainty.Definite)
        {
            MatchScope = storeEvent.MatchScope;
            SinkClass = storeEvent.SinkClass;
            ScriptUrl = storeEvent.ScriptUrl;
            MdbType = type;
            SerialNumberString = serialNumberString;
            Url = storeEvent.Path;
            Criteria = storeEvent.Criteria;
            ComClassInfo = storeEvent.EncodedComClassEventInfo;
        }

        
    }
}